Distance measurement method, intelligent control method, electronic device, and storage medium

ABSTRACT

The present disclosure relates to a distance measurement method, an intelligent control method and apparatus, an electronic device, and a storage medium. The method includes: obtaining a detection bounding box of a target object in an image photographed by a current object; determining at least one distance measurement point according to the shape of the detection bounding box; and determining a distance between the target object and the current object based on the distance measurement point.

CROSS-REFERENCE TO RELATED APPLICATIONS

The present application is a continuation of and claims priority under35 U.S.C. § 120 to International Application No. PCT/CN2019/084519,filed Apr. 26, 2019, which claims priority to Chinese Patent ApplicationNo. 201810394688.4, filed in the Chinese Patent Office on Apr. 27, 2018and entitled “DISTANCE MEASUREMENT METHOD, INTELLIGENT CONTROL METHOD,AND APPARATUS, ELECTRONIC DEVICE, AND STORAGE MEDIUM”. Allabove-referenced priority documents are incorporated herein by referencein their entirety.

TECHNICAL FIELD

The present disclosure relates to the field of computer visiontechnologies, and in particular, to a distance measurement method, anintelligent control method and apparatus, an electronic device, and astorage medium.

BACKGROUND

When a vehicle is intelligently driven, it is necessary to use acomputer vision technology to sense distances to other vehicles andpassersby, and to use the sensed distances to other vehicles andpassersby in decision concerning intelligent driving.

SUMMARY

The present disclosure provides a technical solution concerning adistance measurement method and a technical solution concerning anintelligent control method.

According to one aspect of the present disclosure, a distancemeasurement method is provided, including: obtaining a detectionbounding box of a target object in an image photographed by a currentobject; determining at least one distance measurement point according tothe shape of the detection bounding box; and determining a distancebetween the target object and the current object based on the distancemeasurement point.

According to one aspect of the present disclosure, an intelligentcontrol method is provided, including: obtaining a distance between acurrent object and a target object by using the distance measurementmethod as stated above; and generating early warning information and/orcontrol information for the current object according to the distance.

According to one aspect of the present disclosure, a distancemeasurement apparatus is provided, including: a detection bounding boxobtaining module, configured to obtain a detection bounding box of atarget object in an image photographed by a current object; a distancemeasurement point determining module, configured to determine at leastone distance measurement point according to the shape of the detectionbounding box; and a distance determining module, configured to determinea distance between the target object and the current object based on thedistance measurement point.

According to one aspect of the present disclosure, an intelligentcontrol apparatus is provided, including: a distance obtaining module,configured to obtain a distance between a current object and a targetobject by using the distance measurement apparatus as stated above; anda control information generating module, configured to generate earlywarning information and/or control information for the current objectaccording to the distance.

According to one aspect of the present disclosure, an electronic deviceis provided, including: a processor; and a memory configured to storeprocessor executable instructions, where the processor is configured to:execute the distance measurement method and/or the intelligent controlmethod.

According to one aspect of the present disclosure, a computer readablestorage medium is provided, having computer program instructions storedthereon, where when the computer program instructions are executed by aprocessor, the distance measurement method and/or the intelligentcontrol method provided in the present disclosure is implemented.

According to one aspect of the present disclosure, a computer program isprovided, where when the computer program is executed by a processor,the distance measurement method and/or the intelligent control methodprovided in the present disclosure is implemented.

In embodiments of the present disclosure, at least one distancemeasurement point is determined according to the shape of a detectionbounding box of a target object, and then a distance between a currentobject and the target object is determined according to the distancemeasurement point. Since the shape of the detection bounding box isclosely related to the distance of the target object, a photographingvisual angle, and a motion state of the target object per se, thedistance measurement point determined according to the shape of thedetection bounding box can be applied to obtain an accurate measurementresult.

The other features and aspects of the present disclosure can bedescribed more clearly according to the detailed descriptions of theexemplary embodiments in the accompanying drawings below.

BRIEF DESCRIPTION OF THE DRAWINGS

The accompanying drawings included in the specification and constitutinga part of the specification illustrate the exemplary embodiments,features, and aspects of the present disclosure together with thespecification, and are used for explaining the principles of the presentdisclosure.

FIG. 1 is a flowchart of a distance measurement method according to oneembodiment of the present disclosure;

FIG. 2 is a flowchart of a distance measurement method according to oneembodiment of the present disclosure;

FIG. 3 is a flowchart of a distance measurement method according to oneembodiment of the present disclosure;

FIG. 4 is a flowchart of a distance measurement method according to oneembodiment of the present disclosure;

FIG. 5 is a flowchart of a distance measurement method according to oneembodiment of the present disclosure;

FIG. 6 is a flowchart of a distance measurement method according to oneembodiment of the present disclosure;

FIG. 7 is a block diagram of a distance measurement apparatus accordingto one embodiment of the present disclosure;

FIG. 8 is a block diagram of an intelligent control apparatus accordingto one embodiment of the present disclosure; and

FIG. 9 is a block diagram of an electronic device according to oneexemplary embodiment.

DETAILED DESCRIPTION

Various exemplary embodiments, features, and aspects of the presentdisclosure are described below in detail with reference to theaccompanying drawings. The same reference numerals in the accompanyingdrawings represent elements having the same or similar functions.Although the various aspects of the embodiments are illustrated in theaccompanying drawings, unless stated particularly, it is not required todraw the accompanying drawings in proportion.

The special word “exemplary” here means “used as examples, embodiments,or descriptions”. Any “exemplary” embodiment given here is notnecessarily construed as being superior to or better than otherembodiments.

In addition, numerous details are given in the following detaileddescription for the purpose of better explaining the present disclosure.It should be understood by persons skilled in the art that the presentdisclosure can still be implemented even without some of those details.In some examples, methods, means, elements, and circuits that are wellknown to persons skilled in the art are not described in detail so thatthe principle of the present disclosure becomes apparent.

FIG. 1 is a flowchart of a distance measurement method according to oneembodiment of the present disclosure. As shown in FIG. 1, the distancemeasurement method includes the following steps.

At step S10, a detection bounding box of a target object in an imagephotographed by a current object is obtained.

In one possible implementation, the current object may include a movableobject, and may also include an immovable object. The current object mayinclude a person, a motor vehicle, a non-motor vehicle, a robot, awearable device and the like. When the current object is a vehicle,embodiments of the present disclosure may be applied to the technicalfields such as automatic driving and assistant driving. When the currentobject is a monitoring device provided at the roadside, the embodimentsof the present disclosure may be applied to measure the distance betweenthe target object and the monitoring device. The current object can bedetermined according to requirements. No limitation is made thereto inthe present disclosure.

A photographing apparatus may be equipped on the current object tophotograph an image in a set direction according to the requirements fordistance measurement. The image photographed by the current object mayinclude a single frame image photographed by using the photographingapparatus, and may also include frame images in a video streamphotographed by using the photographing apparatus.

The current object may use various visual sensors, such as a monocularcamera, an RGB camera, an infrared camera, and a binocular camera, forphotographing images. Using a monocular camera system results in lowcosts and a swift response. The RGB camera or the infrared camera may beused for photographing images in a special environment. The binocularcamera may be used for obtaining richer information of the targetobject. Different photographing devices may be selected and usedaccording to the requirements for distance measurement, the environment,the type of the current object, the cost, and the like. No limitation ismade thereto in the present disclosure.

The target object includes a vehicle, a passerby, a building, anobstacle, an animal, and the like. The target object may be a single ormultiple target objects in one object type, and may also be multipletarget objects in multiple object types. For example, only a vehicle isused as the target object, the target object may be one vehicle, and maybe multiple vehicles. Vehicles and passersby may also be jointly used asthe target objects. The target objects are multiple vehicles andmultiple passersby. According to requirements, a set object type may beused as the target object, and a set individual object may also be usedas the target object.

The detection bounding box of the target object in the imagephotographed by the current object can be obtained by using the imagedetection technology. The detection bounding box may be a rectangularbounding box, and may also be a bounding box in another shape. The shapeof the detection bounding box of each target object in the image may beidentical, and may also be different as the shape of the target objectis different. The size of the detection bounding box may be different asan image area occupied by the target object in the image is different.For example, the target objects in the image include three motorvehicles and two passersby. By using the image detection technology,five detection bounding boxes can be used in the image to identify thetarget objects.

The detection bounding box may be an outline bounding box of thedetected target object, for example, the detection bounding box is thesmallest outline bounding box of the detected target object, thedetection bounding box of each of the three motor vehicles may be therectangular bounding box having a long span in the width direction, andthe detection bounding box of either of the two passersby may be therectangular bounding box having a long span in the height direction. Thedetection bounding box of the closer motor vehicle or passerby may belarger, and the detection bounding box of the farther motor vehicle orpasserby may be smaller.

At step S20, at least one distance measurement point is determinedaccording to the shape of the detection bounding box.

In one possible implementation, the distance measurement point isdetermined in the image, so as to be used for measuring the distancebetween the target object and the current object. The distancemeasurement point may be determined at a fixed position on the bottomedge of the detection bounding box, for example, a center point of thebottom edge of the detection bounding box is determined as the distancemeasurement point, and then the distance measurement point may be usedfor determining the distance between the target object and the currentobject.

In the image, the difference in distance of the target object,photographing visual angle, and motion state of the target object per semay result in a change in image content of the target object in thedetection bounding box, and may also result in a change in the shape ofthe detection bounding box. For example, when the target object, a motorvehicle 1, parks or travels relative to the width direction of a vehicle2 having an automatic driving or assistant driving function, one side ofthe motor vehicle 1 faces a camera, the detection bounding box of themotor vehicle 1 includes a vehicle body image of the side of the motorvehicle 1, and the shape of the detection bounding box is therectangular bounding box having a long span in the width direction. Whenthe motor vehicle 1 travels or parks relative to the height direction ofthe vehicle having the automatic driving or assistant driving function,the head or tail of the motor vehicle 1 faces a camera, the detectionbounding box of the motor vehicle 1 includes an image of the head ortail of the motor vehicle 1, and the shape of the detection bounding boxis the rectangular bounding box having a short span in the widthdirection.

In a conventional distance measurement method, the distance measurementpoint determined according to the center point of the bottom edge of thedetection bounding box may be the center point of the bottom edge of theside of the motor vehicle 1, and may also be the center point of thebottom edge of the head or tail of the motor vehicle 1. The distancemeasurement point corresponds to a different position on the targetobject per se. The selected position of the distance measurement pointmay differ greatly as the distance of the target object, thephotographing visual angle, and the motion state of the target objectper se differ. Furthermore, an image obtained by the vehicle having theautomatic driving or assistant driving function generally includes amoving target object, such as a motor vehicle traveling on the road anda passerby who is walking. Image content in the detection bounding boxcorresponding to the moving target object will change largely as thetarget object moves. Therefore, the distance measurement pointdetermined according to the fixed position of the detection bounding boxcannot reflect any constant attribute information of the target objectper se, corresponds to different positions of the target object, and hasa large change. Since the selection to the distance measurement pointcan influence the accuracy of a distance measurement result, thedistance measurement point determined according to the fixed position ofthe detection bounding box cannot be applied to obtain an accuratemeasurement result.

The determining at least one distance measurement point according to theshape of the detection bounding box includes determining at least onedistance measurement point on the detection bounding box or in thedetection bounding box according to the shape of the detection boundingbox. Since the shape of the detection bounding box is closely related tothe distance of the target object, the photographing visual angle, andthe motion state of the target object per se, the distance measurementpoint determined according to the shape of the detection bounding boxcan be applied to obtain the accurate measurement result.

At step S30, a distance between the target object and the current objectis determined based on the distance measurement point.

In one possible implementation, in the field of computer visiontechnologies, plane homography may be defined as projection mapping fromone plane to another plane. The plane homography may include mapping ofa point on a two-dimensional plane to an image. After the correspondingposition of the distance measurement point in the image is mapped to anenvironment where the current object is located by using a homographymatrix constructed based on the environment where the current object islocated, the distance between the target object and the current objectis determined.

In one possible implementation, when the images photographed by thecurrent object are multiple associated static images, or when the imagesphotographed by the current object are frame images in a video stream,the distance measurement point is determined separately according toeach image. Or, the position of the distance measurement point of thesame target object determined in a first image is used as the positionsof the distance measurement points in all the images, and no separatecalculation is performed on the subsequent images any more.

In the embodiments, at least one distance measurement point isdetermined according to the shape of the detection bounding box of thetarget object, and then the distance between the current object and thetarget object is determined according to the distance measurement point.Since the shape of the detection bounding box is closely related to thedistance of the target object, the photographing visual angle, and themotion state of the target object per se, the distance measurement pointdetermined according to the shape of the detection bounding box can beapplied to obtain the accurate measurement result.

In one possible implementation, prompt information may be sent accordingto the determined distance.

The prompt information may include sound information, image information,vibration information, a short massage, email information and the like.Prompt information of different levels may be sent according to thevalue of the determined distance. For example, if the distance is lessthan 5 m, serious warning information is sent, if the distance isgreater than 5 m and less than 10 m, warning information is sent, and ifthe distance is greater than 10 m, notification information is sent. Theprompt information of different levels may be represented in differentinformation forms, for example, the serious warning information adoptsthe sound information, the warning information adopts the vibrationinformation, and the notification information adopts the short messageinformation. The prompt information of different levels may also berepresented using sounds of different decibels, for example, 100 decibelsound indicates the serious warning information, 50 decibel soundindicates the warning information, and 20 decibel sound indicates thenotification information. No limitation is made thereto in the presentdisclosure.

In one possible implementation, the detection bounding box includes therectangular bounding box, and the determining at least one distancemeasurement point according to the shape of the detection bounding boxincludes: determining at least one distance measurement point accordingto the height of the rectangular bounding box.

In one possible implementation, a three-dimensional coordinate system isestablished by taking the ground plane as a determined plane of X axisand Y axis and the direction from the ground plane to the sky as apositive direction of Z axis. When the established three-dimensionalcoordinate system corresponds to the image photographed by the currentobject, the height of the rectangular bounding box of the target objectis a distance in the Z axis direction calculated by taking the bottomedge of the rectangular bounding box as the origin of a Z axiscoordinate and the top edge of the rectangular bounding box as anendpoint of the Z axis coordinate. The bottom edge of the rectangularbounding box is an edge where the part of the target object in contactwith the ground is located. For example, if the target object is thevehicle, the bottom edge of the rectangular bounding box is the edgewhere tires are located. The height of the rectangular bounding box isthe height from the tire of the vehicle to the roof.

The width direction of the rectangular bounding box is a projectiondirection of the rectangular bounding box on a plane parallel to theground plane (which can also be referred as a horizontal direction).Optionally, the width of the rectangular bounding box may include widthinformation of the target object in a direction in which the targetobject is photographed. The height direction of the rectangular boundingbox is a projection direction of the rectangular bounding box on a planeperpendicular to the ground plane (which can also be referred as avertical direction). Optionally, the height of the rectangular boundingbox may include height information of the target object in the directionin which the target object is photographed. The width of the rectangularbounding box corresponding to the target object may change largely asthe motion state and the photographing angle differ. However, the heightof the rectangular bounding box corresponding to the target object doesnot change obviously even the motion state and the photographing anglediffer because the height reflects height information of the targetobject per se. For example, for the rectangular bounding boxcorresponding to the target object, the motor vehicle 1, in the image,as the motor vehicle 1 turns, the width of the rectangular bounding boxchanges largely while the shape of the rectangular bounding box does notchange largely.

In the embodiments, since the height information of the target objectper se does not change largely in the image, a more accurate distancemeasurement result can be obtained according to the distance measurementpoint determined according to the height of the rectangular boundingbox.

In one possible implementation, the determining at least one distancemeasurement point according to the height of the rectangular boundingbox includes: determining at least one distance measurement point on thebottom edge of the rectangular bounding box according to the height ofthe rectangular bounding box.

In one possible implementation, the at least one distance measurementpoint may be determined on the bottom edge of the rectangular boundingbox according to the height of the rectangular bounding box. The bottomedge of the rectangular bounding box is the edge where the part of thetarget object in contact with the ground is located, and the position ofthe bottom edge is relatively fixed and more stable.

In the case of determining the distance measurement point on the bottomedge of the rectangular bounding box, the left or right end point of thebottom edge of the rectangular bounding box may be taken as a startpoint, a product is obtained by multiplying the height of therectangular bounding box with a height weight coefficient, and theposition on the bottom edge of the rectangular bounding box having adistance to the start point as the value of the product is determined asthe position of the distance measurement point. For example, the widthof the rectangular bounding box of the motor vehicle 1 is 3 cm, theheight is 1 cm, and the height weight coefficient is 0.5. The left endpoint of the bottom edge of the rectangular bounding box is taken as thestart point, the position on the bottom edge of the rectangular boundingbox having the distance to the left end point of the bottom edge as1×0.5=0.5 (cm) is determined as the position of the distance measurementpoint.

In the embodiments, at least one distance measurement point isdetermined on the bottom edge of the rectangular bounding box accordingto the height of the rectangular bounding box, so that the more accuratedistance measurement result is obtained.

In one possible implementation, determining the distance measurementpoint on the bottom edge of the rectangular bounding box according tothe height of the rectangular bounding box includes:

determining the height weight coefficient according to an aspect ratioand an aspect ratio threshold of the rectangular bounding box; and

determining the distance measurement point on the bottom edge of therectangular bounding box according to the height of the rectangularbounding box and the height weight coefficient.

In one possible implementation, the height weight coefficient mayinclude a first height weight coefficient and a second height weightcoefficient, and the first height weight coefficient is different fromthe second height weight coefficient. The aspect ratio of therectangular bounding box includes a ratio of the width to the height ofthe rectangular bounding box. Since the target object is different, theratio of the width to the height of the rectangular bounding box is alsodifferent. In the case of determining the distance measurement point onthe bottom edge of the rectangular bounding box according to the heightof the rectangular bounding box, the position of the distancemeasurement point on the bottom edge of the rectangular bounding box maydeviate greatly due to the overlarge height of the rectangular boundingbox. The distance measurement point is determined after the first heightweight coefficient or the second height weight coefficient is selectedto be multiplied by the height of the rectangular bounding box accordingto the aspect ratio and the aspect ratio threshold of the rectangularbounding box, where the position of the distance measurement point canbe determined more accurately and reasonably because the target objectis different.

The aspect ratio threshold includes a threshold determined according tothe ratio of the width to the height of the rectangular bounding box. Itmay be determined according to the aspect ratio and the aspect ratiothreshold of the rectangular bounding box that the first height weightcoefficient or the second height weight coefficient is multiplied by theheight of the rectangular bounding box. For example, the aspect ratiothreshold is 1, the first height weight coefficient is 0.1, and thesecond height weight coefficient is 0.5. A rectangular bounding box 1 isthe vehicle, the width of the rectangular bounding box 1 is 3 cm, theheight is 1 cm, and the aspect ratio of the rectangular bounding box 1is 3. A rectangular bounding box 2 is the passerby, the width of therectangular bounding box 2 is 1 cm, the height is 3 cm, and the aspectratio of the rectangular bounding box 2 is 0.3. If the distancemeasurement point is determined according to the same height weightcoefficient 0.5, and the left end point of the bottom edge of therectangular bounding box is taken as the start point, the distancemeasurement point is determined at a position of the rectangularbounding box 1 away from the start point by 0.5 cm, and the distancemeasurement point is determined at a position of the rectangularbounding box 2 away from the start point by 1.5 cm, which is greaterthan the total length of the bottom edge of the rectangular bounding box2, such that the position of the distance measurement point deviatesgreatly.

The aspect ratios of the rectangular bounding box 1 and the rectangularbounding box 2 may be compared with the aspect ratio threshold. Theaspect ratio of the rectangular bounding box is 3, which is greater thanthe aspect ratio threshold 1, and the height of the rectangular boundingbox 1 is multiplied by the second height weight coefficient 0.5. Theleft end point of the rectangular bounding box 1 may be taken as thestart point, and the distance measurement point is determined at aposition away from the left end point of the bottom edge of therectangular bounding box 1 by 1×0.5=0.5 (cm). The aspect ratio of therectangular bounding box 2 is 0.3, which is less than the aspect ratiothreshold 1, and the height of the rectangular bounding box 2 ismultiplied by the first height weight coefficient 0.1. The left endpoint of the rectangular bounding box 2 may be taken as the start point,and the position of the distance measurement point is determined at aposition away from the left end point of the bottom edge of therectangular bounding box 2 by 3×0.1=0.3 (cm).

In the embodiments, a different height weight coefficient is selected tobe multiplied by the height of the rectangular bounding box according tothe comparison result of the aspect ratio and the aspect ratio thresholdof the rectangular bounding box, and then the distance measurement pointis determined on the bottom edge of the rectangular bounding box. It canadapt to rectangular bounding boxes of various heights, so that thedetermined position of the distance measurement point is more reasonableand the measurement result is more accurate. Moreover, the embodimentshave a wider application range.

FIG. 2 is a flowchart of a distance measurement method according to oneembodiment of the present disclosure. As shown in FIG. 2, the step S30includes the following steps.

At step S31, the distance between the target object and the currentobject is determined based on the distance measurement point and thehomography matrix constructed based on the environment where the currentobject is located.

In one possible implementation, in computer vision, plane homography isdefined as projection mapping from one plane to another plane. Switchingmay be achieved between two planes in a three-dimensional space. Themapping of a point on the two-dimensional plane to a camera imager is anexample of plane homography. The mapping of point P on a calibrationplate to point m on the imager by using homogeneous coordinates can berepresented by using a so-called homography matrix, where thehomogeneous coordinates include representing an original n-dimensionalvector as an n+1 dimensional vector, and indicates a system ofcoordinates used in projective geometry, as Cartesian coordinates areused in Euclidean geometry.

Distance information from the distance measurement point in the imagephotographed by the current object to the target object can be obtainedby using the homography matrix. The homography matrix may be constructedbefore distance measurement based on the environment where the currentobject is located. For example, a real road surface image may bephotographed by using a monocular camera equipped on anautomatically-driven vehicle, and a homography matrix is constructed byusing a set of points on the road surface image and a corresponding setof points of the set of points on the image on a real road surface. Aspecific method may include: 1. coordinate system establishment:establishing a vehicle body coordinate system by taking the left frontwheel of the automatically-driven vehicle as an origin, a rightwarddirection of the visual angle of a driver as a positive direction of Xaxis, and a frontward direction as a positive direction of Y axis; 2.point selection: selecting points in the vehicle body coordinate systemto obtain a set of selected points, such as (0, 5), (0, 10), (0, 15),(1.85, 5), (1.85, 10), and (1.85, 15), the unit of each point beingmeter, where farther points may also be selected as needed; 3. marking:marking the selected point on the real road surface to obtain a set ofreal points; 4. calibration: obtaining a corresponding pixel position ofthe set of real points in the photographed image by using thecalibration plate and a calibration program; and 5. generating thehomography matrix according to the corresponding pixel position.

The homography matrix may be constructed according to different distanceranges as needed. For example, the homography matrix is constructedaccording to a 100 m distance range, or according to a 10 m range. Thenarrower the distance range, the higher the precision of the distancedetermined according to the homography matrix.

In the embodiments, the distance of the target object is determined byusing the homography matrix and the distance measurement point. Theaccurate distance of the target object may be obtained by using thecalibrated homography matrix.

FIG. 3 is a flowchart of a distance measurement method according to oneembodiment of the present disclosure. As shown in FIG. 3, the step S31includes the following steps.

At step S311, a first distance between the target object and the currentobject is determined based on the distance measurement point and a firsthomography matrix, the first homography matrix including a homographymatrix of a first distance range.

At step S312, a second distance between the target object and thecurrent object is determined according to the determined first distanceand a second homography matrix, the second homography matrix including ahomography matrix of a second distance range, and the first distancerange being greater than the second distance range.

In one possible implementation, after the first distance of the targetobject is determined according to the first homography matrix and thedistance measurement point, the second distance of the target object maythen be determined by using the second homography matrix. Since thefirst distance range is greater than the second distance range, thesecond distance calculated by using the second homography matrix is moreaccurate. For example, the distance range of the first homography matrixis 100 m, and the distance range of the second homography matrix is 10m, so that the second homography matrices of 10 distance ranges, i.e.,0-10 m, 10-20 m, 20-30 m . . . 90-100 m, may be generated. It is alsoapplicable to only generate the second homography matrix of a setdistance range as needed, for example, only four second homographymatrices of 20-30 m, 30-40 m, 40-50 m, and 50-60 m are generated. Forexample, it is determined according to the first homography matrix andthe distance measurement point that the distance of the target object is58.32 m, and then it is further determined according to the secondhomography matrix of 50-60 m that the second distance of the targetobject is 54.21 m.

In the embodiments, the distance between the target object and thecurrent object is determined according to the homography matrices ofdifferent distance ranges, so that the calculation efficiency isimproved and the distance measurement result is more accurate.

FIG. 4 is a flowchart of a distance measurement method according to oneembodiment of the present disclosure. As shown in FIG. 4, the step S10includes the following step.

At step S11, target object detection is performed, based on a neuralnetwork, on the image photographed by the current object to obtain thedetection bounding box of the target object.

In one possible implementation, the image may be detected based on theneural network to obtain the detection bounding box of the targetobject. The neural network may be based on architectural approaches suchas Region-based Fully Convolutional Networks (RFCN), a Single Shotmultibox Detector (SSD), Regions with Convolutional Neural Network(RCNN), FastRCNN (a Fast RCNN), FasterRCNN (a Faster RCNN), SpatialPyramid Pooling Convolutional Networks (SPPNet), Deformable Parts Models(DPM), OverFeat, and You Only Look Once (YOLO). No limitation is madethereto in the present disclosure.

FIG. 5 is a flowchart of a distance measurement method according to oneembodiment of the present disclosure. The image is a frame image in avideo photographed by the current object. As shown in FIG. 5, the stepS10 includes the following steps.

At step S12, target object detection is performed on the image to obtaina first detection bounding box of the target object.

At step S13, a historical detection bounding box of the target object isobtained in at least one frame image earlier in time sequence than theimage in the video.

At step S14, a predicted bounding box of the target object is determinedin the image according to the historical detection bounding box of thetarget object.

At step S15, a second detection bounding box of the target object isdetermined according to the first detection bounding box and thepredicted bounding box.

In one possible implementation, when the image is the frame image in thevideo photographed by the current object, the target object may alsoappear in at least one frame image earlier in time sequence than theimage in the video. A detection bounding box in the frame image earlierthan that of the target object may be taken as the historical detectionbounding box of the target object. For example, a monitoring picture ofthe motor vehicle 1 is included in a monitoring video obtained by amonitoring camera facing a road. The detection bounding boxes of themotor vehicle 1 appear in the 10^(th) to 120^(th) frame of themonitoring video, and the detection bounding boxes of the motor vehicle1 in the 10^(th) to 120^(th) frame of image are taken as the historicaldetection bounding boxes. A motion state of the motor vehicle 1 may bedetermined according to the historical detection bounding boxes of themotor vehicle 1. The positions of the motor vehicle 1 in the 121 framesof frame images may be predicted according to the determined motionstate of the motor vehicle 1, and the positions of the predictedbounding boxes of the motor vehicle 1 in the 121 frame images may bepredicted according to the predicted positions.

The historical detection bounding boxes may be screened so that aprediction result of the predicted bounding boxes is more accurate. Forexample, the historical detection bounding boxes having overlargeposition change in the frame images earlier than the image may beexcluded.

The predicted bounding box of the target object may be determinedaccording to all the historical detection bounding boxes of the targetobject, and may also be determined according to a set number ofhistorical detection bounding boxes of the target object. For example,the predicted bounding box is determined only according to 100historical detection bounding boxes of the target object.

When a difference in the positions of the first detection bounding boxand the predicted bounding box is less than a set threshold, thepositions of the first detection bounding box and the predicted boundingbox may be subjected to weighted averaging to obtain the position of thesecond detection bounding box, and the second detection bounding box isthe detection bounding box of the target object in the obtained imagephotographed by the current object.

In the embodiments, the predicted bounding box of the target object isdetermined according to the historical detection bounding box of thetarget object, and the second detection bounding box of the targetobject is determined according to the predicted bounding box and thefirst detection bounding box, such that a confirmation process of thedetection bounding box is more efficient and a confirmation result ismore accurate.

In one possible implementation, the historical detection bounding box ofthe target object may be obtained in N frame images earlier than theimage in the video photographed by the current object, where N being apositive integer greater than 1.

In one possible implementation, during the determination of thehistorical detection bounding box of the target object, since the motionstate of the target object continuously changes, a previous historicaldetection bounding box will lose reference significance and mayinterfere with the prediction result of the predicted bounding box. TheN frame images earlier than the image may be placed in a smooth queue ina manner of setting the smooth queue. For example, once determined, thedetection bounding box of the current frame image may be taken as thehistorical detection bounding box of the target object in the next frameimage. A current frame may be added into the smooth queue, and theearliest frame image in the smooth queue is deleted to keep only N frameimages in the smooth queue. The value of N may be set as needed.

In the embodiments, the historical detection bounding box of the targetobject is obtained in the N frame images earlier than the image, so thatthe interference with the predicted bounding box by the earlierhistorical detection bounding box may be eliminated, and thus theprediction result of the predicted bounding box is more accurate.

FIG. 6 is a flowchart of a distance measurement method according to oneembodiment of the present disclosure. The image is a frame image in adetection video. As shown in FIG. 6, the step S14 includes the followingsteps.

At step S141, the motion state of the target object is determinedaccording to the historical detection bounding box of the target object.

At step S142, the predicted bounding box of the target object is fittedaccording to the motion state of the target object.

In one possible implementation, a history position, a motion speed,motion acceleration, a motion trajectory, and the like of the targetobject may be obtained according to the historical detection boundingboxes of the target object. The motion state of the target object in theimage may be obtained according to the history position, the motionspeed, the motion acceleration, and the motion trajectory of the targetobject. For example, it may be obtained according to the historicaldetection bounding boxes of the target object, the motor vehicle 2, thatthere are 100 positions of the historical detection bounding boxes ofthe motor vehicle 2, including coordinate point 1, coordinate point 2,coordinate point 3 . . . coordinate point 98, coordinate point 99, andcoordinate point 100, and it may be obtained according to the foregoingcoordinate points that the driving speed of the motor vehicle 2 is Akm/h. A predicted coordinate point 101 of the motor vehicle 2 in theimage may be obtained according to the 100 history coordinate points andthe driving speed, and the predicted coordinate point 101 is determinedas the position of the predicted bounding box of the motor vehicle 2.

In one possible implementation, the position of the predicted boundingbox may be fitted according to the historical detection bounding boxes,and the aspect ratio of the last historical detection bounding box istaken as the aspect ratio of the predicted bounding box, therebydetermining the predicted bounding box.

In the embodiments, after the motion state of the target object isdetermined according to the historical detection bounding boxes of thetarget object, the position of the predicted bounding box of the targetobject may be fitted according to the motion state of the target object,so that the predicted bounding box is more accurate.

In one possible implementation, the image is the frame image in thedetection video. The step S14 includes:

determining a change state of an aspect ratio of the historicaldetection bounding box according to the historical detection boundingbox of the target object; and

fitting an aspect ratio of the predicted bounding box of the targetobject according to the change state of the aspect ratio of thehistorical detection bounding box.

In one possible implementation, the size and shape of the historicaldetection bounding box will change accordingly depending on the motionstate of the target object. For example, for a motor vehicle 3 travelingclose to a vehicle having the automatic driving or assistant drivingfunction from an opposite direction, as the motor vehicle 3 gets closerto the vehicle having the automatic driving or assistant drivingfunction, the detection bounding box of the motor vehicle 3 includesmore and more images of the side vehicle body, and the width of thedetection bounding box also continuously changes. The aspect ratio ofthe historical detection bounding box is closely associated with themotion state and position information of the target object. The aspectratio of the predicted bounding box of the target object in the imagemay be fitted according to the change state of the aspect ratio of thetarget object in the historical detection bounding box.

In one possible implementation, the position of the predicted boundingbox may be fitted according to the historical detection bounding box,the aspect ratio of the predicted bounding box is fitted according tothe aspect ratio of the predicted bounding box, and finally, thepredicted bounding box is determined according to the fitted positionand the fitted aspect ratio.

In the embodiments, the aspect ratio of the predicted bounding box isfitted according to the change state of the aspect ratio of thehistorical detection bounding box of the target object, so that thepredicted bounding box is more accurate.

In one possible implementation, the step S15 includes:

determining a first overlapping rate between the first detectionbounding box of the target object and the predicted bounding box of thetarget object;

when the first overlapping rate is greater than or equal to a firstoverlapping threshold, determining a detection position of the targetobject according to the position of the first detection bounding box ofthe target object and the position of the predicted bounding box of thetarget object;

determining a detection aspect ratio of the target object according toan aspect ratio of the first detection bounding box of the target objectand the aspect ratio of the predicted bounding box of the target object;and determining the second detection bounding box of the target objectaccording to the detection position and the detection aspect ratio.

In one possible implementation, the first overlapping rate may include arepeat proportion of image content in the first detection bounding boxand the predicted bounding box. When the first overlapping rate of thefirst detection bounding box and the predicted bounding box is greaterthan or equal to the first overlapping threshold, it can be consideredthat the first detection bounding box roughly coincides with thepredicted bounding box, and the second detection bounding box may beobtained after the first detection bounding box is corrected accordingto the predicted bounding box. When the overlapping between the firstdetection bounding box and the predicted bounding box is less than thefirst overlapping rate, it can be considered that the first detectionbounding box and the predicted bounding box have a large difference, andthe section detection bounding box cannot be obtained after the firstdetection bounding box is corrected according to the predicted boundingbox.

Correcting the first detection bounding box according to the predictedbounding box includes correcting the position of the first detectionbounding box according to the position of the predicted bounding box,and correcting the aspect ratio of the first detection bounding boxaccording to the aspect ratio of the predicted bounding box. Thedetection position of the target object may be determined by calculatingan intermediate point of the position of the predicted bounding box andthe position of the first detection bounding box, and the detectionaspect ratio of the target object may be determined by calculating anintermediate value of the aspect ratio of the predicted bounding box andthe aspect ratio of the first detection bounding box.

Or the detection position of the target object may be determined byperforming weighted averaging on the positions of the predicted boundingbox and the first detection bounding box, where the weight of theposition of the first detection bounding box is higher than the weightof the position of the predicted bounding box, and the detection aspectratio of the target object may be determined by performing weightedaveraging on the aspect ratios of the predicted bounding box and thefirst detection bounding box, where the weight of the aspect ratio ofthe first detection bounding box is higher than the weight of the aspectratio of the predicted bounding box.

The second detection bounding box of the target object may be determinedaccording to the determined detection position and detection aspectratio of the target object.

In the embodiments, the first overlapping rate between the predictedbounding box and the first detection bounding box of the target objectis calculated, and after the first overlapping rate is compared with thefirst overlapping threshold, the detection position and the detectionaspect ratio of the target object is determined according to both thepredicted bounding box and the first detection bounding box which havethe great overlapping rate. The detection position and the detectionaspect ratio of the target object determined according to the predictedbounding box and the first detection bounding box better meet the motiontrajectory of the target object. The obtained position and aspect ratioof the second detection bounding box are more accurate.

In one possible implementation, the method further includes:

when the first overlapping rate is less than the first overlappingthreshold, determining the first detection bounding box of the targetobject as the second detection bounding box of the target object.

In one possible implementation, when the target object moves to fast,the first overlapping rate of the predicted bounding box and the firstdetection bounding box may be less than the first overlapping threshold.For example, when the target object, a motor vehicle 4, travels toofast, and thus images in the predicted bounding box and the firstdetection bounding box have a large difference, the value of predictingthe predicted bounding box obtained according to the historicaldetection bounding box is lost. The first detection bounding box may bedetermined as the second detection bounding box.

In the embodiments, when the first overlapping rate between thepredicted bounding box and the first detection bounding box is toosmall, the second detection bounding box of the target object isdetermined only according to the first detection bounding box. Theinfluence from the content having no prediction value in the historicaldetection bounding box on the accuracy of the second detection boundingbox may be reduced.

In one possible implementation, the determining the second detectionbounding box of the target object according to the first detectionbounding box and the predicted bounding box further includes: whentarget object detection is performed on the image, and the firstdetection bounding box of the target object cannot be obtained, thepredicted bounding box of the target object is determined as the seconddetection bounding box of the target object.

In one possible implementation, when the first detection bounding box ofthe target object is not obtained, the predicted bounding box may bedetermined as the second detection bounding box of the target object.The detection bounding box is continuous and the measurement result ismore complete.

In one possible implementation, the step S15 further includes: when thehistorical detection bounding box of the target object overlaps ahistorical detection bounding box of another object, obtaining a secondoverlapping rate between the historical detection bounding box of thetarget object and the historical detection bounding box of the anotherobject;

calculating a third overlapping rate between the historical detectionbounding box of the target object and the first detection bounding boxof the target object in a previous frame image of the image; and whenthe third overlapping rate is greater than the second overlapping rate,determining the first detection bounding box of the target object as thesecond detection bounding box of the target object.

In one possible implementation, when the target object is close toanother object, images of the target object and the another object inthe image may overlap. For example, for a motor vehicle 5 and a motorvehicle 6 parked side by side in a parking lot, images of the motorvehicle 5 and the motor vehicle 6 in a monitoring image may overlap in aparticular photographing angle. When the target object is the motorvehicle 5, in the image, it is necessary to calculate the secondoverlapping rate between the historical detection bounding box of themotor vehicle 5 and the historical detection bounding box of the motorvehicle 6, and calculate a third overlapping rate between the firstdetection bounding box of the motor vehicle 5 and the historicaldetection bounding box of the motor vehicle 5, and when the thirdoverlapping rate is greater than the second overlapping rate, the firstdetection bounding box of the motor vehicle 5 is determined as thesecond detection bounding box of the motor vehicle 5. It is possible toprevent the first detection bounding box of the motor vehicle 6 frombeing mistakenly determined as the detection bounding box of the motorvehicle 5.

In the embodiments, when the historical detection bounding box of thetarget object overlaps the historical detection bounding box of anotherobject, the second detection bounding box of the target object isdetermined according to the second overlapping rate between thehistorical detection bounding box of the target object and thehistorical detection bounding box of the another object, and the thirdoverlapping rate between the historical detection bounding box and thefirst detection bounding box of the target object. The interference withthe target object by the another object close to the target object isreduced or even eliminated, thereby improving the accuracy of thedetection bounding box of the target object.

In one possible implementation, the present disclosure provides anintelligent control method, including:

obtaining a distance between a current object and a target object byusing the distance measurement method according to any one ofembodiments of the present disclosure; and

generating early warning information and/or control information for thecurrent object according to the distance.

In one possible implement, the distance between the current object andthe target object may be obtained according to the distance measurementmethod according to any one of the embodiments of the presentdisclosure, and depending on intelligent control requirements, the earlywarning information and/or the control information is generatedaccording to the obtained distance.

In one possible implementation, the current object may include one orany combination of the following objects: a person, a vehicle, a robot,a wearable device, a blind guide device, a monitoring device, anintelligent terminal device, a production device, and a building. Theintelligent control requirements may be determined according to thecurrent object. For example, when the current object is a person, theearly warning information may be sent to the person according to theobtained distance to the target object, so as to prompt that the persongets too close to the target object, and an avoidance measure needs tobe taken. When the current object is a vehicle having an automaticdriving or assistant driving function, the early warning informationand/or the control information may be sent to the vehicle having theautomatic driving or assistant driving function according to theobtained distance to the target object, so as to prompt a driver to takethe avoidance measure or directly control the vehicle having theautomatic driving or assistant driving function to make an avoidanceaction, etc. When the current object is the wearable device, the blindguide device, or the intelligent terminal device, the early warninginformation may be sent, according to the obtained distance to thetarget object, to a person who uses or wears the wearable device, theblind guide device, or the intelligent terminal device. When the currentobject is the monitoring device, the production device, or the building,the early warning information may be sent to a manager of the monitoringdevice, the production device, or the building according to the obtaineddistance to the target object.

When the target object is a combination of multiple objects, differentearly warning information and/or control information may be sent to thedifferent objects according to the obtained distance to the targetobjects. No limitation is made thereto in the present disclosure.

In the embodiments, the early warning information and/or the controlinformation for the current object is generated according to theobtained distance between the current object and the target object, sothat the current object may take a corresponding measure according tothe early warning information and/or the control information.

In one possible implementation, the generating the early warninginformation and/or the control information for the current objectaccording to the distance includes:

generating the early warning information and/or the control informationfor the current object according to the distance and a distancethreshold.

In one possible implementation, the distance threshold may be set, andafter the obtained distance is compared with the distance threshold, theearly warning information and/or the control information for the currentobject is generated according to the comparison result. The earlywarning information and/or the control information for the currentobject may be generated when the obtained distance is greater than thedistance threshold. It is possible to reduce the number of times anintelligent control system sends early warning information with littlewarning significance and/or unnecessary intelligent control according tocontrol information.

For example, the current object is vehicle A having the automaticdriving or assistant driving function, distances to three targetobjects, including target object 1 having a distance of 100 m, targetobject 2 having a distance of 30 m, and target object 3 having adistance of 10 m, are obtained, and if the early warning informationand/or the control information is generated according to the distancesof the three target objects, the early warning information generatedaccording to target object 1 has little early warning significance. Thedistance threshold may be set to be 20 m, and the early warninginformation and/or the control information is generated according to thedistance of target object 3 having the distance less than 20 m, therebyimproving the pertinence of the intelligent control system.

In one possible implementation, the generating the early warninginformation and/or the control information for the current objectaccording to the distance and a distance threshold includes:

when the distance is less than or equal to the distance threshold,generating first early warning information and/or first controlinformation for the current object; and

when the distance is greater than the distance threshold, generatingsecond early warning information and second control information for thecurrent object.

In one possible implementation, the early warning level of the firstearly warning information is higher than that of the second earlywarning information, and the control level of the first controlinformation is higher than that of the second control information. Theearly warning information and the control information of differentlevels may be determined according to the distance threshold. When theobtained distance is less than or equal to the distance threshold, thecurrent object is close to the target object, and the first earlywarning information and/or the first control information at a high levelmay be sent. When the obtained distance is greater than the distancethreshold, the current object is far away to the target object, and thesecond early warning information and/or the second control informationat a low level may be sent.

In the embodiments, the early warning information and/or the controlinformation of different levels may be determined according to thedistance threshold, so that the early warning information and/or thecontrol information generated for the current object is more accurateand more practical.

In one possible implementation, the generating the early warninginformation and/or the control information for the current objectaccording to the distance includes:

determining an early warning level according to the distance; anddetermining early warning information according to the early warninglevel, and/or determining a control level according to the distance; anddetermining control information according to the control level.

In one possible implementation, multiple early warning levels may bedetermined according to different distances according to intelligentcontrol requirements. The early warning levels may be determinedaccording to the same distance interval. For example, five early warninglevels, including a first early warning level for 0-5 m, a second earlywarning level for 5-10 m, a third early warning level for 10-15 m, afourth early warning level for 15-20 m, and a fifth early warning levelfor 20-100 m, may be determined. The early warning levels may also bedetermined according to different distance intervals. For example, threeearly warning levels, including a first early warning level for 0-5 m, asecond early warning level for 5-20 m, and a third early warning levelfor 20-200 m, may be determined. No limitation is made thereto in thepresent disclosure.

An approach of determining the control level may refer to the foregoingapproach of determining the early warning level. The approach ofdetermining the early warning level may be identical to or differentfrom the approach of determining the control level. For example, theearly warning level is determined when the distance is less than 150 m,and the control level is determined when the distance is less than 20 m.No limitation is made thereto in the present disclosure.

In one possible implementation, the early warning information mayinclude one or any combination of the following information: sound earlywarning information, light early warning information, text early warninginformation, image early warning information, and vibration information;and the control information may include one or any combination of thefollowing information: emergency brake information, stop information,acceleration information, and turn information.

In one possible implementation, the early warning information ofdifferent information types may be set for different early warninglevels, and the different early warning levels are distinguished byusing the information types. Or the early warning information of thesame information type may be set for different early warning levels, andthe different early warning levels are distinguished by using differentfeatures of the early warning information per se. For example, the soundearly warning information may be set for a high early warning level, andthe text information is set for a low early warning level. The earlywarning information of different levels may also be represented usingsounds of different decibels. No limitation is made thereto in thepresent disclosure.

In one possible implementation, the control information of differentcontrol types may be set for different control levels. The differentcontrol levels are distinguished by using the control types. Or thecontrol information of the same control type may be set for differentcontrol levels, and the different control levels are distinguished byusing different features of the control information per se. For example,the acceleration information or deceleration information may be set fora low control level, and the emergency brake information or stopinformation is set for a high control level. Or the accelerationinformation of small acceleration may be set for the low control level,and the acceleration information of large acceleration is set for thehigh control level. No limitation is made thereto in the presentdisclosure.

In one possible implementation, the control information may be appliedto driving control to a vehicle having the automatic driving orassistant driving function. The driving control may include a controlaction for changing the motion state and/or a motion direction of acurrent driving object, for example, may include: control actions thatmay change the motion direction and/or the motion state of the currentdriving object, including performing acceleration, brake deceleration,driving direction changing on the current driving object and the like.For example, in one actual application scenario, if the original motiondirection of the current vehicle having the automatic driving orassistant driving function is to keep going straight in a current lane,if the current vehicle would collide with a suspected collision objectahead on the basis of a collision time, the driving direction of thecurrent vehicle having the automatic driving or assistant drivingfunction may be changed by means of the driving control, so that thecurrent vehicle having the automatic driving or assistant drivingfunction changes a lane to avoid collision. If the suspected collisionobject ahead accelerates to move away in the process, the drivingdirection of the current vehicle having the automatic driving orassistant driving function may be changed by means of the drivingcontrol, so that the current vehicle having the automatic driving orassistant driving function keeps the original motion direction and keepsgoing straight in the current lane.

In the embodiments, the early warning level and/or the control level isdetermined according to the distance, so that the intelligent controlsystem can achieve more sophisticated intelligent control.

It can be understood that the foregoing various method embodimentsmentioned in the present disclosure may be combined with each other toform a combined embodiment without departing from the principle logic.Details are not described in the present disclosure again due to spacelimitation.

In addition, the present disclosure further provides an image processingapparatus, an electronic device, a computer readable storage medium, anda program, which can all be configured to implement any one of themethods provided in the present disclosure. For the correspondingtechnical solutions and descriptions, please refer to the correspondingcontents in the method parts. Details are not described herein again.

FIG. 7 is a block diagram of a distance measurement apparatus accordingto one embodiment of the present disclosure. As shown in FIG. 7, thedistance measurement apparatus includes:

a detection bounding box obtaining module 10, configured to obtain adetection bounding box of a target object in an image photographed by acurrent object;

a distance measurement point determining module 20, configured todetermine at least one distance measurement point according to the shapeof the detection bounding box; and

a distance determining module 30, configured to determine a distancebetween the target object and the current object based on the distancemeasurement point.

In the embodiments, at least one distance measurement point isdetermined according to the shape of the detection bounding box of thetarget object, and then the distance between the current object and thetarget object is determined according to the distance measurement point.Since the shape of the detection bounding box is closely related to thedistance of the target object, the photographing visual angle, and themotion state of the target object per se, the distance measurement pointdetermined according to the shape of the detection bounding box can beapplied to obtain an accurate measurement result.

In one possible implementation, the detection bounding box includes arectangular bounding box, and the distance measurement point determiningmodule 20 includes: a first distance measurement point determiningsub-module, configured to determine the at least one distancemeasurement point according to the height of the rectangular boundingbox.

In the embodiments, since the height information of the target objectper se does not change largely in the image, a more accurate distancemeasurement result can be obtained according to the distance measurementpoint determined according to the height of the rectangular boundingbox.

In one possible implementation, the first distance measurement pointdetermining sub-module includes: a bottom edge distance measurementpoint determining sub-module, configured to determine the at least onedistance measurement point on the bottom edge of the rectangularbounding box according to the height of the rectangular bounding box.

In the embodiments, at least one distance measurement point may bedetermined on the bottom edge of the rectangular bounding box accordingto the height of the rectangular bounding box, so that the more accuratedistance measurement result is obtained.

In one possible implementation, the bottom edge distance measurementpoint determining sub-module includes: a height weight coefficientdetermining sub-module, configured to determine a height weightcoefficient according to an aspect ratio and an aspect ratio thresholdof the rectangular bounding box; and a first bottom edge distancemeasurement point determining sub-module, configured to determine thedistance measurement point on the bottom edge of the rectangularbounding box according to the height of the rectangular bounding box andthe height weight coefficient. In the embodiments, a different heightweight coefficient is selected to be multiplied by the height of therectangular bounding box according to a comparison result of the aspectratio and the aspect ratio threshold of the rectangular bounding box,and then the distance measurement point is determined on the bottom edgeof the rectangular bounding box. It can adapt to rectangular boundingboxes of various heights, so that the determined position of thedistance measurement point is more reasonable and the measurement resultis more accurate. Moreover, the embodiments have a wider applicationrange.

In one possible implementation, the distance determining moduleincludes: a first distance determining sub-module, configured todetermine the distance between the target object and the current objectbased on the distance measurement point and a homography matrixconstructed based on an environment where the current object is located.

In the embodiments, the distance of the target object is determined byusing the homography matrix and the distance measurement point. Theaccurate distance of the target object may be obtained by using acalibrated homography matrix.

In one possible implementation, the first distance determiningsub-module includes: a second distance determining sub-module,configured to determine a first distance between the target object andthe current object based on the distance measurement point and a firsthomography matrix, the first homography matrix including a homographymatrix of a first distance range; and a third distance determiningsub-module, configured to determine a second distance between the targetobject and the current object according to the determined first distanceand a second homography matrix, the second homography matrix including ahomography matrix of a second distance range, and the first distancerange being greater than the second distance range.

In the embodiments, the distance between the target object and thecurrent object is determined according to the homography matrices ofdifferent distance ranges, so that the calculation efficiency isimproved and the distance measurement result is more accurate.

In one possible implementation, the detection bounding box obtainingmodule includes: a first detection bounding box obtaining sub-module,configured to perform target object detection, based on a neuralnetwork, on the image photographed by the current object to obtain thedetection bounding box of the target object. In the embodiments, theimage may be detected based on the neural network to obtain thedetection bounding box of the target object.

In one possible implementation, the image is a frame image in a videophotographed by the current object. The detection bounding box obtainingmodule includes: a second detection bounding box obtaining sub-module,configured to perform target object detection on the image to obtain afirst detection bounding box of the target object; a historicaldetection bounding box obtaining sub-module, configured to obtain ahistorical detection bounding box of the target object in at least oneframe image earlier in time sequence than the image in the video; apredicted bounding box obtaining sub-module, configured to determine apredicted bounding box of the target object in the image according tothe historical detection bounding box of the target object; and a thirddetection bounding box obtaining sub-module, configured to determine asecond detection bounding box of the target object according to thefirst detection bounding box and the predicted bounding box.

In the embodiments, the predicted bounding box of the target object isdetermined according to the historical detection bounding box of thetarget object, and the second detection bounding box of the targetobject is determined according to the predicted bounding box and thefirst detection bounding box, such that a confirmation process of thedetection bounding box is more efficient and a confirmation result ismore accurate.

In one possible implementation, the predicted bounding box obtainingsub-module includes: a motion state obtaining sub-module, configured todetermine a motion state of the target object according to thehistorical detection bounding box of the target object; and a firstpredicted bounding box obtaining sub-module, configured to fit thepredicted bounding box of the target object according to the motionstate of the target object.

In the embodiments, after the motion state of the target object isdetermined according to the historical detection bounding box of thetarget object, the position of the predicted bounding box of the targetobject may be fitted according to the motion state of the target object,so that the predicted bounding box is more accurate.

In one possible implementation, the predicted bounding box obtainingsub-module includes: a change state obtaining sub-module, configured todetermine a change state of an aspect ratio of the historical detectionbounding box according to the historical detection bounding box of thetarget object; and a second predicted bounding box obtaining sub-module,configured to fit an aspect ratio of the predicted bounding box of thetarget object according to the change state of the aspect ratio of thehistorical detection bounding box.

In the embodiments, the aspect ratio of the predicted bounding box isfitted according to the change state of the aspect ratio of thehistorical detection bounding box of the target object, so that thepredicted bounding box is more accurate.

In one possible implementation, the third detection bounding boxobtaining sub-module includes: a first overlapping rate obtainingsub-module, configured to determine a first overlapping rate between thefirst detection bounding box of the target object and the predictedbounding box of the target object; a detection position obtainingsub-module, configured to, when the first overlapping rate is greaterthan or equal to a first overlapping threshold, determine a detectionposition of the target object according to the position of the firstdetection bounding box of the target object and the position of thepredicted bounding box of the target object; a detection aspect ratioobtaining sub-module, configured to determine a detection aspect ratioof the target object according to an aspect ratio of the first detectionbounding box of the target object and the aspect ratio of the predictedbounding box of the target object; and a fourth detection bounding boxobtaining sub-module, configured to determine the second detectionbounding box of the target object according to the detection positionand the detection aspect ratio.

In the embodiments, the first overlapping rate between the predictedbounding box and the first detection bounding box of the target objectis calculated, and after the first overlapping rate is compared with thefirst overlapping threshold, the detection position and the detectionaspect ratio of the target object is determined according to both thepredicted bounding box and the first detection bounding box which havethe great overlapping rate. The detection position and the detectionaspect ratio of the target object determined according to the predictedbounding box and the first detection bounding box better meet the motiontrajectory of the target object. The obtained position and aspect ratioof the second detection bounding box are more accurate.

In one possible implementation, the apparatus further includes: a fifthdetection bounding box obtaining sub-module, configured to, when thefirst overlapping rate is less than the first overlapping threshold,determine the first detection bounding box of the target object as thesecond detection bounding box of the target object.

In the embodiments, when the first overlapping rate between thepredicted bounding box and the first detection bounding box is toosmall, the second detection bounding box of the target object isdetermined only according to the first detection bounding box. Theinfluence from the content having no prediction value in the historicaldetection bounding box on the accuracy of the second detection boundingbox may be reduced.

In one possible implementation, the third detection bounding boxobtaining sub-module further includes: a sixth detection bounding boxobtaining sub-module, configured to, when the first detection boundingbox of the target object is not obtained by performing target objectdetection on the image, determine the predicted bounding box of thetarget object as the second detection bounding box of the target object.

In the embodiments, when the first detection bounding box of the targetobject is not obtained, the predicted bounding box may be determined asthe second detection bounding box of the target object. The detectionbounding box is continuous and the measurement result is more complete.

In one possible implementation, the third detection bounding boxobtaining sub-module further includes: a second overlapping rateobtaining sub-module, configured to, when the historical detectionbounding box of the target object overlaps a historical detectionbounding box of another object, obtain a second overlapping rate betweenthe historical detection bounding box of the target object and thehistorical detection bounding box of the another object; a thirdoverlapping rate obtaining sub-module, configured to calculate a thirdoverlapping rate between the historical detection bounding box of thetarget object and the first detection bounding box of the target objectin a previous frame image of the image; and a seventh detection boundingbox obtaining sub-module, configured to, when the third overlapping rateis greater than the second overlapping rate, determine the firstdetection bounding box of the target object as the second detectionbounding box of the target object.

In the embodiments, when the historical detection bounding box of thetarget object overlaps the historical detection bounding box of anotherobject, the second detection bounding box of the target object isdetermined according to the second overlapping rate between thehistorical detection bounding box of the target object and thehistorical detection bounding box of the another object, and the thirdoverlapping rate between the historical detection bounding box and thefirst detection bounding box of the target object. The interference withthe target object by the another object close to the target object isreduced or even eliminated, thereby improving the accuracy of thedetection bounding box of the target object.

In some embodiments, the functions provided by or the modules includedin the distance measurement apparatus provided by the embodiments of thepresent disclosure may be used to implement the method described in theforegoing distance measurement method embodiments. For specificimplementations, reference may be made to the description in theforegoing distance measurement method embodiments. For the purpose ofbrevity, details are not described herein again.

FIG. 8 is a block diagram of an intelligent control apparatus accordingto one embodiment of the present disclosure. As shown in FIG. 8, theintelligent control apparatus includes:

a distance obtaining module 1, configured to obtain a distance between acurrent object and a target object by using the apparatus according toany claim of the distance measurement method; and

a control information generating module 2, configured to generate earlywarning information and/or control information for the current objectaccording to the distance.

In the embodiments, the early warning information and/or the controlinformation for the current object is generated according to theobtained distance between the current object and the target object, sothat the current object may take a corresponding measure according tothe early warning information and/or the control information.

In one possible implementation, the current object includes one or anycombination of the following objects: a person, a vehicle, a robot, awearable device, a blind guide device, a monitoring device, anintelligent terminal device, a production device, and a building.

In one possible implementation, the control information generatingmodule 2 includes: a first control information generating module,configured to generate the early warning information and/or the controlinformation for the current object according to the distance and adistance threshold.

In the embodiments, the distance threshold may be set, and after theobtained distance is compared with the distance threshold, the earlywarning information and/or the control information for the currentobject is generated according to the comparison result. The earlywarning information and/or the control information for the currentobject may be generated when the obtained distance is greater than thedistance threshold. It is possible to reduce the number of times anintelligent control system sends early warning information with littlewarning significance and/or unnecessary intelligent control according tocontrol information.

In one possible implementation, the first control information generatingmodule includes: a first control information generating sub-module,configured to, when the distance is less than or equal to the distancethreshold, generate first early warning information and/or first controlinformation for the current object; and a second control informationgenerating sub-module, configured to, when the distance is greater thanthe distance threshold, generate second early warning information and/orsecond control information for the current object.

In the embodiments, the early warning information and/or the controlinformation of different levels may be determined according to thedistance threshold, so that the early warning information and/or thecontrol information generated for the current object is more accurateand more practical.

In one possible implementation, the first control information generatingmodule includes: an early warning level determining sub-module,configured to determine an early warning level according to thedistance; an early warning information determining sub-module,configured to determine the early warning information according to theearly warning level, and/or a control level determining sub-module,configured to determine a control level according to the distance; and acontrol information determining sub-module, configured to determine thecontrol information according to the control level.

In the embodiments, the early warning level and/or the control level isdetermined according to the distance, so that the intelligent controlsystem can achieve more sophisticated intelligent control.

In one possible implementation, the early warning information includesone or any combination of the following information: sound early warninginformation, light early warning information, text early warninginformation, image early warning information, and vibration information;and the control information includes one or any combination of thefollowing information: emergency brake information, stop information,acceleration information, deceleration information, and turninformation.

In some embodiments, the functions provided by or the modules includedin the intelligent control apparatus provided by the embodiments of thepresent disclosure may be used to implement the method described in theforegoing intelligent control method embodiments. For specificimplementations, reference may be made to the description in theforegoing intelligent control method embodiments. For the purpose ofbrevity, details are not described herein again.

FIG. 9 is a block diagram of an electronic device according to oneexemplary embodiment. The electronic device 800 may be provided as aterminal, a server, or devices in other forms. The electronic device isconfigured for distance measurement. For example, the device 800 may bea mobile phone, a computer, a digital broadcast terminal, a messagetransceiving device, a game console, a tablet device, a medical device,exercise equipment, a personal digital assistant, etc.

With reference to FIG. 9, the device 800 may include one or more of thefollowing components: a processing component 802, a memory 804, a powersupply component 806, a multimedia component 808, an audio component810, an Input/Output (I/O) interface 812, a sensor component 814, and acommunication component 816.

The processing component 802 generally controls overall operation of thedevice 800, such as operations associated with display, phone calls,data communications, camera operations, and recording operations. Theprocessing component 802 may include one or more processors 820 toexecute instructions to implement all or some of the steps of themethods above. In addition, the processing component 802 may include oneor more modules to facilitate interaction between the processingcomponent 802 and other components. For example, the processingcomponent 802 may include a multimedia module to facilitate interactionbetween the multimedia component 808 and the processing component 802.

The memory 804 is configured to store various types of data to supportoperations on the device 800. Examples of the data include instructionsfor any application or method operated on the device 800, contact data,contact list data, messages, pictures, videos, and the like. The memory804 may be implemented by any type of volatile or non-volatile storagedevice, or a combination thereof, such as a Static Random-Access Memory(SRAM), an Electrically Erasable Programmable Read-Only Memory (EEPROM),an Erasable Programmable Read-Only Memory (EPROM), a ProgrammableRead-Only Memory (PROM), a Read-Only Memory (ROM), a magnetic memory, aflash memory, a disk or an optical disk.

The power supply component 806 provides power for various components ofthe device 800. The power supply component 806 may include a powermanagement system, one or more power supplies, and other componentsassociated with power generation, management, and distribution for thedevice 800.

The multimedia component 808 includes a screen between the device 800and a user that provides an output interface. In some embodiments, thescreen may include a Liquid Crystal Display (LCD) and a Touch Panel(TP). If the screen includes a TP, the screen may be implemented as atouch screen to receive input signals from the user. The TP includes oneor more touch sensors for sensing touches, swipes, and gestures on theTP. The touch sensor may not only sense the boundary of a touch or swipeaction, but also detect the duration and pressure related to the touchor swipe operation. In some embodiments, the multimedia component 808includes a front-facing camera and/or a rear-facing camera. When thedevice 800 is in an operation mode, for example, a photography mode or avideo mode, the front-facing camera and/or the rear-facing camera mayreceive external multimedia data. Each of the front-facing camera andthe rear-facing camera may be a fixed optical lens system, or have focallength and optical zoom capabilities.

The audio component 810 is configured to output and/or input an audiosignal. For example, the audio component 810 includes a microphone(MIC), and the microphone is configured to receive an external audiosignal when the device 800 is in an operation mode, such as a callingmode, a recording mode, and a voice recognition mode. The received audiosignal may be further stored in the memory 804 or transmitted by meansof the communication component 816. In some embodiments, the audiocomponent 810 further includes a speaker for outputting the audiosignal.

The I/O interface 812 provides an interface between the processingcomponent 802 and a peripheral interface module, which may be akeyboard, a click wheel, a button, etc. The button may include, but isnot limited to, a home button, a volume button, a start button, and alock button.

The sensor assembly 814 includes one or more sensors for providing stateassessment in various aspects for the device 800. For example, thesensor component 814 may detect an on/off state of the device 800, andrelative positioning of components, which are for example the displayand keypad of the device 800, and the sensor assembly 814 may furtherdetect a position change of the device 800 or a component of the device800, the presence or absence of contact of the user with the device 800,the orientation or acceleration/deceleration of the device 800, and atemperature change of the device 800. The sensor component 814 mayinclude a proximity sensor, which is configured to detect the presenceof a nearby object when there is no physical contact. The sensorcomponent 814 may further include a light sensor, such as a CMOS or CCDimage sensor, for use in an imaging application. In some embodiments,the sensor component 814 may further include an acceleration sensor, agyroscope sensor, a magnetic sensor, a pressure sensor, or a temperaturesensor.

The communication component 816 is configured to facilitate wired orwireless communications between the device 800 and other devices. Thedevice 800 may access a wireless network based on a communicationstandard, such as WiFi, 2G, or 3G, or a combination thereof. In oneexemplary embodiment, the communication component 816 receives abroadcast signal or broadcast-related information from an externalbroadcast management system by means of a broadcast channel. In oneexemplary embodiment, the communication component 816 further includes aNear Field Communication (NFC) module to facilitate short-rangecommunication. For example, the NFC module may be implemented based onRadio Frequency Identification (RFID) technology, Infrared DataAssociation (IrDA) technology, Ultra-Wideband (UWB) technology,Bluetooth (BT) technology, and other technologies.

In exemplary embodiments, the device 800 may be implemented by one ormore Application-Specific Integrated Circuits (ASICs), Digital SignalProcessors (DSPs), Digital Signal Processing Devices (DSPDs),Programmable Logic Devices (PLDs), Field-Programmable Gate Arrays(FPGAs), controllers, microcontrollers, microprocessors, or otherelectronic elements, to execute the method above.

In exemplary embodiments, a non-volatile computer readable storagemedium is further provided, for example, a memory 804 including computerprogram instructions, which may be executed by the processor 820 of thedevice 800 to implement the method above.

In exemplary embodiments, a computer program is further provided. Whenthe computer program is executed by a processor, any method above isimplemented. For example, the computer program may be executed by theprocessor 820 of the device 800 to implement any method above.

The present disclosure may be a system, a method, and/or a computerprogram product. The computer program product may include a computerreadable storage medium having computer readable program instructionsthereon for enabling a processor to implement aspects of the presentdisclosure.

The computer readable storage medium may be a tangible device that canretain and store instructions for use by an instruction executiondevice. The computer readable storage medium may be, for example, but isnot limited to, an electronic storage device, a magnetic storage device,an optical storage device, an electromagnetic storage device, asemiconductor storage device, or any suitable combination thereof. Morespecific examples (a non-exhaustive list) of the computer readablestorage medium include: a portable computer diskette, a hard disk, aRandom Access Memory (RAM), an ROM, an EPROM (or a flash memory), aSRAM, a portable Compact Disk Read-Only Memory (CD-ROM), a DigitalVersatile Disc (DVD), a memory stick, a floppy disk, a mechanicallyencoded device such as punch-cards or raised structure in a groovehaving instructions stored thereon, and any suitable combinationthereof. A computer readable storage medium, as used herein, is not tobe construed as being transitory signals per se, such as radio waves orother freely propagating electromagnetic waves, electromagnetic wavespropagating by means of a waveguide or other transmission media (e.g.,light pulses passing through a fiber-optic cable), or electrical signalstransmitted by means of a wire.

Computer-readable program instructions described herein may bedownloaded to respective computing/processing devices from the computerreadable storage medium or to an external computer or external storagedevice by means of a network, for example, the Internet, a Local AreaNetwork (LAN), a wide area network and/or a wireless network. Thenetwork may include copper transmission cables, optical transmissionfibers, wireless transmission, routers, firewalls, switches, gatewaycomputers and/or edge servers. A network adapter card or networkinterface in each computing/processing device receives computer readableprogram instructions from the network and forwards the computer readableprogram instructions for storage in a computer readable storage mediumwithin the respective computing/processing device.

Computer program instructions for carrying out operations of the presentdisclosure may be assembler instructions, Instruction-Set-Architecture(ISA) instructions, machine instructions, machine dependentinstructions, microcode, firmware instructions, state-setting data, oreither source code or object code written in any combination of one ormore programming languages, including an object oriented programminglanguage such as Smalltalk, C++ or the like, and conventional proceduralprogramming languages, such as the “C” programming language or similarprogramming languages. Computer readable program instructions may beexecuted completely on a user computer, executed partially on the usercomputer, executed as an independent software package, executedpartially on the user computer and partially on a remote computer, orexecuted completely on the remote computer or server. In a scenarioinvolving the remote computer, the remote computer may be connected tothe user computer by means of any type of network, including a LAN or aWide Area Network (WAN), or the connection may be made to an externalcomputer (for example, connecting by using an Internet service providerby means of the Internet). In some embodiments, electronic circuitryincluding, for example, programmable logic circuitry, the FGPAs, orProgrammable Logic Arrays (PLAs) may execute the computer readableprogram instructions by utilizing state information of the computerreadable program instructions to personalize the electronic circuitry,so as to implement the aspects of the present disclosure.

The aspects of the present disclosure are described herein withreference to flowcharts and/or block diagrams of methods, apparatuses(systems), and computer program products according to the embodiments ofthe present disclosure. It should be understood that each block of theflowcharts and/or block diagrams, and combinations of the blocks in theflowcharts and/or block diagrams may be implemented by the computerreadable program instructions.

These computer readable program instructions may be provided to aprocessor of a general-purpose computer, special-purpose computer, orother programmable data processing apparatus to produce a machine, suchthat the instructions, which execute by means of the processor of thecomputer or other programmable data processing apparatuses, create meansfor executing the functions/actions specified in one or more blocks ofthe flowcharts and/or block diagrams. These computer readable programinstructions may also be stored in the computer readable storage medium,the instructions enable the computer, the programmable data processingapparatus, and/or other devices to function in a particular manner, sothat the computer readable medium having instructions stored thereinincludes an article of manufacture including instructions whichimplement the aspects of the functions/actions specified in one or moreblocks of the flowcharts and/or block diagrams.

The computer readable program instructions may also be loaded onto acomputer, other programmable data processing apparatuses, or otherdevices to cause a series of operational steps to be performed on thecomputer, other programmable apparatuses or other devices to produce acomputer implemented process, so that the instructions which execute onthe computer, other programmable apparatuses or other devices implementthe functions/actions specified in one or more blocks of the flowchartsand/or block diagrams.

The flowcharts and block diagrams in the accompanying drawingsillustrate the architecture, functionality and operations of possibleimplementations of systems, methods, and computer program productsaccording to multiple embodiments of the present disclosure. In thisregard, each block in the flowchart or block diagram may represent amodule, program segment, or portion of instruction, which includes oneor more executable instructions for executing the specified logicalfunction. In some alternative implementations, the functions noted inthe block may also occur out of the order noted in the accompanyingdrawings. For example, two blocks shown in succession may, in fact, beexecuted substantially concurrently, or the blocks may sometimes beexecuted in the reverse order, depending upon the functionalityinvolved. It should also be noted that each block of the block diagramsand/or flowcharts, and combinations of blocks in the block diagramsand/or flowcharts, may be implemented by special purpose hardware-basedsystems that perform the specified functions or actions or implementedby combinations of special purpose hardware and computer instructions.

The descriptions of the embodiments of the present disclosure have beenpresented for purposes of illustration, but are not intended to beexhaustive or limited to the embodiments disclosed. Many modificationsand variations will be apparent to persons of ordinary skill in the artwithout departing from the scope and spirit of the describedembodiments. The terminology used herein was chosen to best explain theprinciples of the embodiments, the practical application or technicalimprovement over technologies found in the marketplace, or to enableother persons of ordinary skill in the art to understand the embodimentsdisclosed herein.

What is claimed is:
 1. A distance measurement method, comprising:obtaining a detection bounding box of a target object in an imagephotographed by a current object; determining at least one distancemeasurement point according to the shape of the detection bounding box;and determining a distance between the target object and the currentobject based on the distance measurement point, wherein the detectionbounding box comprises a rectangular bounding box, and determining atleast one distance measurement point according to the shape of thedetection bounding box comprises: determining the at least one distancemeasurement point according to the height of the rectangular boundingbox, wherein determining the at least one distance measurement pointaccording to the height of the rectangular bounding box comprises:determining the at least one distance measurement point on the bottomedge of the rectangular bounding box according to the height of therectangular bounding box.
 2. The method according to claim 1, whereindetermining the distance measurement point on the bottom edge of therectangular bounding box according to the height of the rectangularbounding box comprises: determining a height weight coefficientaccording to an aspect ratio of the rectangular bounding box and anaspect ratio threshold; and determining the distance measurement pointon the bottom edge of the rectangular bounding box according to theheight of the rectangular bounding box and the height weightcoefficient.
 3. The method according to claim 1, wherein determining thedistance between the target object and the current object based on thedistance measurement point comprises: determining the distance betweenthe target object and the current object based on the distancemeasurement point and a homography matrix constructed based on anenvironment where the current object is located.
 4. The method accordingto claim 3, wherein determining the distance between the target objectand the current object based on the distance measurement point and thehomography matrix comprises: determining a first distance between thetarget object and the current object based on the distance measurementpoint and a first homography matrix, the first homography matrixcomprising a homography matrix of a first distance range; anddetermining a second distance between the target object and the currentobject according to the determined first distance and a secondhomography matrix, the second homography matrix comprising a homographymatrix of a second distance range, and the first distance range beinggreater than the second distance range.
 5. The method according to claim1, wherein obtaining the detection bounding box of the target object inthe image photographed by the current object comprises: performingtarget object detection, based on a neural network, on the imagephotographed by the current object to obtain the detection bounding boxof the target object.
 6. The method according to claim 1, wherein theimage is a frame image in a video photographed by the current object,and obtaining the detection bounding box of the target object in theimage photographed by the current object comprises: performing targetobject detection on the image to obtain a first detection bounding boxof the target object; obtaining a historical detection bounding box ofthe target object in at least one frame image earlier in time sequencethan the image in the video; determining a predicted bounding box of thetarget object in the image according to the historical detectionbounding box of the target object; and determining a second detectionbounding box of the target object according to the first detectionbounding box and the predicted bounding box.
 7. The method according toclaim 6, wherein determining the predicted bounding box of the targetobject in the image according to the historical detection bounding boxof the target object comprises: determining a motion state of the targetobject according to the historical detection bounding box of the targetobject; and fitting the predicted bounding box of the target objectaccording to the motion state of the target object; and/or determining achange state of an aspect ratio of the historical detection bounding boxaccording to the historical detection bounding box of the target object;and fitting an aspect ratio of the predicted bounding box of the targetobject according to the change state of the aspect ratio of thehistorical detection bounding box.
 8. The method according to claim 6,wherein determining the second detection bounding box of the targetobject according to the first detection bounding box and the predictedbounding box comprises: determining a first overlapping rate between thefirst detection bounding box of the target object and the predictedbounding box of the target object; when the first overlapping rate isgreater than or equal to a first overlapping threshold, determining adetection position of the target object according to the position of thefirst detection bounding box of the target object and the position ofthe predicted bounding box of the target object; determining a detectionaspect ratio of the target object according to an aspect ratio of thefirst detection bounding box of the target object and the aspect ratioof the predicted bounding box of the target object; and determining thesecond detection bounding box of the target object according to thedetection position and the detection aspect ratio; or when the firstdetection bounding box of the target object is not obtained byperforming target object detection on the image, determining thepredicted bounding box of the target object as the second detectionbounding box of the target object.
 9. The method according to claim 8,wherein the method further comprises: when the first overlapping rate isless than the first overlapping threshold, determining the firstdetection bounding box of the target object as the second detectionbounding box of the target object.
 10. The method according to claim 6,wherein determining the second detection bounding box of the targetobject according to the first detection bounding box and the predictedbounding box comprises: when the historical detection bounding box ofthe target object overlaps a historical detection bounding box ofanother object, obtaining a second overlapping rate between thehistorical detection bounding box of the target object and thehistorical detection bounding box of the another object; calculating athird overlapping rate between the historical detection bounding box ofthe target object and the first detection bounding box of the targetobject in a previous frame image of the image; and when the thirdoverlapping rate is greater than the second overlapping rate,determining the first detection bounding box of the target object as thesecond detection bounding box of the target object.
 11. An intelligentcontrol method, comprising: obtaining a distance between a currentobject and a target object by using the method according to claim 1; andgenerating early warning information and/or control information for thecurrent object according to the distance.
 12. The method according toclaim 11, wherein the current object comprises one or any combination ofthe following objects: a person, a vehicle, a robot, a wearable device,a blind guide device, a monitoring device, an intelligent terminaldevice, a production device, and a building.
 13. The method according toclaim 11, wherein generating early warning information and/or controlinformation for the current object according to the distance comprises:generating the early warning information and/or the control informationfor the current object according to the distance and a distancethreshold.
 14. The method according to claim 13, wherein generating theearly warning information and/or the control information for the currentobject according to the distance and the distance threshold comprises:when the distance is less than or equal to the distance threshold,generating first early warning information and/or first controlinformation for the current object; and when the distance is greaterthan the distance threshold, generating second early warning informationand/or second control information for the current object.
 15. The methodaccording to claim 11, wherein generating early warning informationand/or control information for the current object according to thedistance comprises: determining an early warning level according to thedistance; determining the early warning information according to theearly warning level, and/or determining a control level according to thedistance; and determining the control information according to thecontrol level.
 16. The method according to claim 11, wherein the earlywarning information comprises one or any combination of the followinginformation: sound early warning information, light early warninginformation, text early warning information, image early warninginformation, and vibration information; and the control informationcomprises one or any combination of the following information: emergencybrake information, stop information, acceleration information,deceleration information, and turn information.
 17. An electronicdevice, comprising: a processor; and a memory configured to storeprocessor executable instructions which, when executed by the processor,cause the processor to execute a distance measurement method,comprising: obtaining a detection bounding box of a target object in animage photographed by a current object; determining at least onedistance measurement point according to the shape of the detectionbounding box; and determining a distance between the target object andthe current object based on the distance measurement point, wherein thedetection bounding box comprises a rectangular bounding box, anddetermining at least one distance measurement point according to theshape of the detection bounding box comprises: determining the at leastone distance measurement point according to the height of therectangular bounding box, wherein determining the at least one distancemeasurement point according to the height of the rectangular boundingbox comprises: determining the at least one distance measurement pointon the bottom edge of the rectangular bounding box according to theheight of the rectangular bounding box.
 18. A non-transitory computerreadable storage medium, having computer program instructions storedthereon, wherein when the computer program instructions are executed bya processor, the processor is caused to implement a distance measurementmethod, comprising: obtaining a detection bounding box of a targetobject in an image photographed by a current object; determining atleast one distance measurement point according to the shape of thedetection bounding box; and determining a distance between the targetobject and the current object based on the distance measurement point,wherein the detection bounding box comprises a rectangular bounding box,and determining at least one distance measurement point according to theshape of the detection bounding box comprises: determining the at leastone distance measurement point according to the height of therectangular bounding box, wherein determining the at least one distancemeasurement point according to the height of the rectangular boundingbox comprises: determining the at least one distance measurement pointon the bottom edge of the rectangular bounding box according to theheight of the rectangular bounding box.